﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Caching;
using System.Threading.Tasks;
using System.Collections;
using System.Windows.Forms;
using System.Web;

namespace QQyinYue
{
    class yinyuekongzhi
    {
        Cache c = HttpRuntime.Cache;
        public void Add(List<XiHuan> list)
        {
            int i = 0;
            foreach (var item in list)
            {
                i += 1;
                c["key" + i] = item.url;
                c.Insert("key" + i, item.url);
            }

        }
        public Cache show() 
        {
            return c;

        }
        public bool delete(int bn) 
        {
            int s = c.Count;
            try
            {
                c.Remove("key" + bn);
                return true;
            }
            catch (Exception)
            {
                return false;     
            }
        }
    }
}
